package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Topic generated by hbm2java
 */
@Entity
@Table(name = "topic")
public class Topic implements java.io.Serializable {

	private Long id;
	private MainPoint mainPoint;
	private MainPointModule mainPointModule;
	private ResourceType resourceType;
	private String topicName;
	private String topicNum;
	private String prefixNum;
	private Integer suffixNum;
	private Integer classMinute;
	private Long userId;
	private byte topicType;
	private String flightStatus1;
	private String flightStatus2;
	private String flightStatus3;
	private String flightStatus4;
	private Integer topicSort;
	private String flightStatusTime1;
	private String flightStatusTime2;
	private String flightStatusTime3;
	private String flightStatusTime4;
	private Set<StudentResitDetail> studentResitDetails = new HashSet<StudentResitDetail>(
			0);
	private Set<PlanTopicSubject> planTopicSubjectsForTopicId = new HashSet<PlanTopicSubject>(
			0);
	private Set<WorkOrderDetail> workOrderDetails = new HashSet<WorkOrderDetail>(
			0);
	private Set<Topic> topicsForSpecialTopicId = new HashSet<Topic>(0);
	private Set<Topic> topicsForNormalTopicId = new HashSet<Topic>(0);
	private Set<PlanTopicSubject> planTopicSubjectsForReviewTopicId = new HashSet<PlanTopicSubject>(
			0);
	private Set<PlanRecordTopic> planRecordTopicsForReviewTopicId = new HashSet<PlanRecordTopic>(
			0);
	private Set<MainPointStudyResult> mainPointStudyResults = new HashSet<MainPointStudyResult>(
			0);
	private Set<StudentRecommend> studentRecommends = new HashSet<StudentRecommend>(
			0);
	private Set<Student> students = new HashSet<Student>(0);
	private Set<WorkOrder> workOrders = new HashSet<WorkOrder>(0);
	private Set<TopicSubject> topicSubjects = new HashSet<TopicSubject>(0);
	private Set<PlanRecordTopic> planRecordTopicsForTopicId = new HashSet<PlanRecordTopic>(
			0);
	private Set<StudentResit> studentResits = new HashSet<StudentResit>(0);

	public Topic() {
	}

	public Topic(byte topicType) {
		this.topicType = topicType;
	}

	public Topic(MainPoint mainPoint, MainPointModule mainPointModule,
			ResourceType resourceType, String topicName, String topicNum,
			String prefixNum, Integer suffixNum, Integer classMinute,
			Long userId, byte topicType, String flightStatus1,
			String flightStatus2, String flightStatus3, String flightStatus4,
			Integer topicSort, String flightStatusTime1,
			String flightStatusTime2, String flightStatusTime3,
			String flightStatusTime4,
			Set<StudentResitDetail> studentResitDetails,
			Set<PlanTopicSubject> planTopicSubjectsForTopicId,
			Set<WorkOrderDetail> workOrderDetails,
			Set<Topic> topicsForSpecialTopicId,
			Set<Topic> topicsForNormalTopicId,
			Set<PlanTopicSubject> planTopicSubjectsForReviewTopicId,
			Set<PlanRecordTopic> planRecordTopicsForReviewTopicId,
			Set<MainPointStudyResult> mainPointStudyResults,
			Set<StudentRecommend> studentRecommends, Set<Student> students,
			Set<WorkOrder> workOrders, Set<TopicSubject> topicSubjects,
			Set<PlanRecordTopic> planRecordTopicsForTopicId,
			Set<StudentResit> studentResits) {
		this.mainPoint = mainPoint;
		this.mainPointModule = mainPointModule;
		this.resourceType = resourceType;
		this.topicName = topicName;
		this.topicNum = topicNum;
		this.prefixNum = prefixNum;
		this.suffixNum = suffixNum;
		this.classMinute = classMinute;
		this.userId = userId;
		this.topicType = topicType;
		this.flightStatus1 = flightStatus1;
		this.flightStatus2 = flightStatus2;
		this.flightStatus3 = flightStatus3;
		this.flightStatus4 = flightStatus4;
		this.topicSort = topicSort;
		this.flightStatusTime1 = flightStatusTime1;
		this.flightStatusTime2 = flightStatusTime2;
		this.flightStatusTime3 = flightStatusTime3;
		this.flightStatusTime4 = flightStatusTime4;
		this.studentResitDetails = studentResitDetails;
		this.planTopicSubjectsForTopicId = planTopicSubjectsForTopicId;
		this.workOrderDetails = workOrderDetails;
		this.topicsForSpecialTopicId = topicsForSpecialTopicId;
		this.topicsForNormalTopicId = topicsForNormalTopicId;
		this.planTopicSubjectsForReviewTopicId = planTopicSubjectsForReviewTopicId;
		this.planRecordTopicsForReviewTopicId = planRecordTopicsForReviewTopicId;
		this.mainPointStudyResults = mainPointStudyResults;
		this.studentRecommends = studentRecommends;
		this.students = students;
		this.workOrders = workOrders;
		this.topicSubjects = topicSubjects;
		this.planRecordTopicsForTopicId = planRecordTopicsForTopicId;
		this.studentResits = studentResits;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAIN_POINT_ID")
	public MainPoint getMainPoint() {
		return this.mainPoint;
	}

	public void setMainPoint(MainPoint mainPoint) {
		this.mainPoint = mainPoint;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAIN_POINT_MODULE_ID")
	public MainPointModule getMainPointModule() {
		return this.mainPointModule;
	}

	public void setMainPointModule(MainPointModule mainPointModule) {
		this.mainPointModule = mainPointModule;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RESOURCE_TYPE")
	public ResourceType getResourceType() {
		return this.resourceType;
	}

	public void setResourceType(ResourceType resourceType) {
		this.resourceType = resourceType;
	}

	@Column(name = "TOPIC_NAME", length = 90)
	public String getTopicName() {
		return this.topicName;
	}

	public void setTopicName(String topicName) {
		this.topicName = topicName;
	}

	@Column(name = "TOPIC_NUM", length = 20)
	public String getTopicNum() {
		return this.topicNum;
	}

	public void setTopicNum(String topicNum) {
		this.topicNum = topicNum;
	}

	@Column(name = "PREFIX_NUM", length = 20)
	public String getPrefixNum() {
		return this.prefixNum;
	}

	public void setPrefixNum(String prefixNum) {
		this.prefixNum = prefixNum;
	}

	@Column(name = "SUFFIX_NUM")
	public Integer getSuffixNum() {
		return this.suffixNum;
	}

	public void setSuffixNum(Integer suffixNum) {
		this.suffixNum = suffixNum;
	}

	@Column(name = "CLASS_MINUTE")
	public Integer getClassMinute() {
		return this.classMinute;
	}

	public void setClassMinute(Integer classMinute) {
		this.classMinute = classMinute;
	}

	@Column(name = "USER_ID")
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "TOPIC_TYPE", nullable = false)
	public byte getTopicType() {
		return this.topicType;
	}

	public void setTopicType(byte topicType) {
		this.topicType = topicType;
	}

	@Column(name = "FLIGHT_STATUS_1", length = 20)
	public String getFlightStatus1() {
		return this.flightStatus1;
	}

	public void setFlightStatus1(String flightStatus1) {
		this.flightStatus1 = flightStatus1;
	}

	@Column(name = "FLIGHT_STATUS_2", length = 20)
	public String getFlightStatus2() {
		return this.flightStatus2;
	}

	public void setFlightStatus2(String flightStatus2) {
		this.flightStatus2 = flightStatus2;
	}

	@Column(name = "FLIGHT_STATUS_3", length = 20)
	public String getFlightStatus3() {
		return this.flightStatus3;
	}

	public void setFlightStatus3(String flightStatus3) {
		this.flightStatus3 = flightStatus3;
	}

	@Column(name = "FLIGHT_STATUS_4", length = 20)
	public String getFlightStatus4() {
		return this.flightStatus4;
	}

	public void setFlightStatus4(String flightStatus4) {
		this.flightStatus4 = flightStatus4;
	}

	@Column(name = "TOPIC_SORT")
	public Integer getTopicSort() {
		return this.topicSort;
	}

	public void setTopicSort(Integer topicSort) {
		this.topicSort = topicSort;
	}

	@Column(name = "FLIGHT_STATUS_TIME_1", length = 20)
	public String getFlightStatusTime1() {
		return this.flightStatusTime1;
	}

	public void setFlightStatusTime1(String flightStatusTime1) {
		this.flightStatusTime1 = flightStatusTime1;
	}

	@Column(name = "FLIGHT_STATUS_TIME_2", length = 20)
	public String getFlightStatusTime2() {
		return this.flightStatusTime2;
	}

	public void setFlightStatusTime2(String flightStatusTime2) {
		this.flightStatusTime2 = flightStatusTime2;
	}

	@Column(name = "FLIGHT_STATUS_TIME_3", length = 20)
	public String getFlightStatusTime3() {
		return this.flightStatusTime3;
	}

	public void setFlightStatusTime3(String flightStatusTime3) {
		this.flightStatusTime3 = flightStatusTime3;
	}

	@Column(name = "FLIGHT_STATUS_TIME_4", length = 20)
	public String getFlightStatusTime4() {
		return this.flightStatusTime4;
	}

	public void setFlightStatusTime4(String flightStatusTime4) {
		this.flightStatusTime4 = flightStatusTime4;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<StudentResitDetail> getStudentResitDetails() {
		return this.studentResitDetails;
	}

	public void setStudentResitDetails(
			Set<StudentResitDetail> studentResitDetails) {
		this.studentResitDetails = studentResitDetails;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topicByTopicId")
	public Set<PlanTopicSubject> getPlanTopicSubjectsForTopicId() {
		return this.planTopicSubjectsForTopicId;
	}

	public void setPlanTopicSubjectsForTopicId(
			Set<PlanTopicSubject> planTopicSubjectsForTopicId) {
		this.planTopicSubjectsForTopicId = planTopicSubjectsForTopicId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<WorkOrderDetail> getWorkOrderDetails() {
		return this.workOrderDetails;
	}

	public void setWorkOrderDetails(Set<WorkOrderDetail> workOrderDetails) {
		this.workOrderDetails = workOrderDetails;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "special_normal_topic", joinColumns = { @JoinColumn(name = "NORMAL_TOPIC_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "SPECIAL_TOPIC_ID", nullable = false, updatable = false) })
	public Set<Topic> getTopicsForSpecialTopicId() {
		return this.topicsForSpecialTopicId;
	}

	public void setTopicsForSpecialTopicId(Set<Topic> topicsForSpecialTopicId) {
		this.topicsForSpecialTopicId = topicsForSpecialTopicId;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "special_normal_topic", joinColumns = { @JoinColumn(name = "SPECIAL_TOPIC_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "NORMAL_TOPIC_ID", nullable = false, updatable = false) })
	public Set<Topic> getTopicsForNormalTopicId() {
		return this.topicsForNormalTopicId;
	}

	public void setTopicsForNormalTopicId(Set<Topic> topicsForNormalTopicId) {
		this.topicsForNormalTopicId = topicsForNormalTopicId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topicByReviewTopicId")
	public Set<PlanTopicSubject> getPlanTopicSubjectsForReviewTopicId() {
		return this.planTopicSubjectsForReviewTopicId;
	}

	public void setPlanTopicSubjectsForReviewTopicId(
			Set<PlanTopicSubject> planTopicSubjectsForReviewTopicId) {
		this.planTopicSubjectsForReviewTopicId = planTopicSubjectsForReviewTopicId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topicByReviewTopicId")
	public Set<PlanRecordTopic> getPlanRecordTopicsForReviewTopicId() {
		return this.planRecordTopicsForReviewTopicId;
	}

	public void setPlanRecordTopicsForReviewTopicId(
			Set<PlanRecordTopic> planRecordTopicsForReviewTopicId) {
		this.planRecordTopicsForReviewTopicId = planRecordTopicsForReviewTopicId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<MainPointStudyResult> getMainPointStudyResults() {
		return this.mainPointStudyResults;
	}

	public void setMainPointStudyResults(
			Set<MainPointStudyResult> mainPointStudyResults) {
		this.mainPointStudyResults = mainPointStudyResults;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<StudentRecommend> getStudentRecommends() {
		return this.studentRecommends;
	}

	public void setStudentRecommends(Set<StudentRecommend> studentRecommends) {
		this.studentRecommends = studentRecommends;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "student_topic", joinColumns = { @JoinColumn(name = "TOPIC_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "STUDENT_ID", nullable = false, updatable = false) })
	public Set<Student> getStudents() {
		return this.students;
	}

	public void setStudents(Set<Student> students) {
		this.students = students;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<WorkOrder> getWorkOrders() {
		return this.workOrders;
	}

	public void setWorkOrders(Set<WorkOrder> workOrders) {
		this.workOrders = workOrders;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<TopicSubject> getTopicSubjects() {
		return this.topicSubjects;
	}

	public void setTopicSubjects(Set<TopicSubject> topicSubjects) {
		this.topicSubjects = topicSubjects;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topicByTopicId")
	public Set<PlanRecordTopic> getPlanRecordTopicsForTopicId() {
		return this.planRecordTopicsForTopicId;
	}

	public void setPlanRecordTopicsForTopicId(
			Set<PlanRecordTopic> planRecordTopicsForTopicId) {
		this.planRecordTopicsForTopicId = planRecordTopicsForTopicId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "topic")
	public Set<StudentResit> getStudentResits() {
		return this.studentResits;
	}

	public void setStudentResits(Set<StudentResit> studentResits) {
		this.studentResits = studentResits;
	}

}
